# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Christian Kohlstedde <christian+arch-pkg@kohlsted.de>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Peter Wu <peter@lekensteyn.nl>

pkgname=bcg729
pkgver=1.1.1
pkgrel=1
pkgdesc='Encoder and decoder of the ITU G.729 Annex A/B speech codec'
url='https://www.linphone.org/technical-corner/bcg729/overview'
arch=('loong64' 'x86_64')
license=('GPL2')
makedepends=('cmake')
depends=('glibc')
source=(https://github.com/BelledonneCommunications/bcg729/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha512sums=('e8cc4b7486a9a29fb729ab9fd9e3c4a2155573f38cec16f5a53db3b416fc1119ea5f5a61243a8d37cb0b64580c5df1b632ff165dc7ff47421fa567dafffaacd8')
b2sums=('6774f6af439c9308db856be9d4bbb6db5c73e7a807b51dca6338d1506d896052a7830ade7767b45fd5a9ded0a6a0057e207bc1d5b0e33adbaed9dafb13a7bd3b')

build() {
  cd ${pkgname}-${pkgver}
  cmake \
      -DCMAKE_INSTALL_PREFIX=/usr \
      -DCMAKE_INSTALL_LIBDIR=lib \
      -DENABLE_STATIC=OFF \
      -Wno-dev \
      -B build \
      -S .
  make VERBOSE=1 -C build
}

package() {
  cd ${pkgname}-${pkgver}
  make -C build DESTDIR="${pkgdir}" install
}

# vim: ts=2 sw=2 et:
